home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 December / PC Answers December 1995 (disc errors).iso / mxc / dryfly.dir / 00005_MS for DryFly.ls < prev    next >
Encoding:
Text File  |  1995-05-04  |  5.7 KB  |  238 lines

  1. global fixPal, myLine, auto, ok, gsliderbar, fullMoov, csn, lem, palName, bd, gAudBlrb, vid, tpal, myLine2, gExtraVid, gdirmovie, gmyLineKeep, gBackColor, gForeColor, profileVid, gVolume, gFirstTimeIn
  2.  
  3. on startMovie
  4.   if the machineType = 256 then
  5.     openXLib("XPALETTE.dll")
  6.     set fixPal to XPALETTE(mnew)
  7.   else
  8.     openXLib("XPALETTE")
  9.     set fixPal to fixPalette(mnew, the stageLeft, the stageTop, the stageRight, the stageBottom)
  10.   end if
  11.   set the textSize of field "Asset List" to 14
  12.   if the colorDepth = 8 then
  13.     set gBackColor to 29
  14.     set gForeColor to 255
  15.   end if
  16.   if the colorDepth = 16 then
  17.     if the machineType < 256 then
  18.       set gBackColor to 729
  19.       set gForeColor to 0
  20.     else
  21.       set gBackColor to 29
  22.       set gForeColor to 255
  23.     end if
  24.   end if
  25.   if the colorDepth = 24 then
  26.     if the machineType < 256 then
  27.       set gBackColor to 46550
  28.       set gForeColor to 0
  29.     else
  30.       set gBackColor to 29
  31.       set gForeColor to 54
  32.     end if
  33.   end if
  34.   if the colorDepth = 32 then
  35.     if the machineType < 256 then
  36.       set gBackColor to 48598
  37.       set gForeColor to 0
  38.     else
  39.       set gBackColor to 29
  40.       set gForeColor to 255
  41.     end if
  42.   end if
  43.   if myLine <> 1 then
  44.     set the controller of cast 101 to 0
  45.   end if
  46.   if myLine <> 1 then
  47.     set the video of cast 101 to 0
  48.   end if
  49.   set auto to 0
  50.   set ok to 3
  51.   set myLine to 1
  52.   set myLine2 to 1
  53.   set gmyLineKeep to 1
  54.   set profileVid to 0
  55.   set tpal to 201
  56.   set fullMoov to the duration of cast 101
  57.   set gExtraVid to 1
  58.   set csn to the number of lines in field "asset list"
  59.   cursor(0)
  60. end
  61.  
  62. on setVid
  63.   if myLine = -1 then
  64.     exit
  65.   end if
  66.   if myLine2 = myLine then
  67.     exit
  68.   end if
  69.   if myLine >= 1 then
  70.     set the castNum of sprite 24 to 26
  71.     updateStage()
  72.   end if
  73.   colorMe()
  74.   set the locV of sprite 3 to -500
  75.   set the locV of sprite 4 to -500
  76.   set the locV of sprite 5 to -500
  77.   set the locV of sprite 6 to -500
  78.   set the locV of sprite 7 to -500
  79.   blankBut()
  80.   moovUpDown()
  81.   updateStage()
  82.   set the castNum of sprite 24 to myLine + 100
  83.   set fullMoov to the duration of cast (myLine + 100)
  84.   set palName to myLine + 200
  85.   puppetPalette(palName)
  86.   patchPal()
  87.   set myLine2 to myLine
  88.   set the locV of sprite 3 to 39
  89.   set the locV of sprite 4 to 74
  90.   set the locV of sprite 5 to 114
  91.   set the locV of sprite 6 to 155
  92.   set the locV of sprite 7 to 191
  93.   set the video of cast (myLine + 100) to 1
  94.   updateStage()
  95.   set the controller of cast (myLine + 100) to gsliderbar
  96.   updateStage()
  97.   set the volume of sprite 24 to gVolume
  98. end
  99.  
  100. on autoPlay
  101.   set fullMoov to the duration of cast (myLine + 100)
  102.   set the castNum of sprite 7 to 35
  103.   updateStage()
  104.   set auto to 1
  105. end
  106.  
  107. on colorMe
  108.   set the foreColor of field "asset list" to gForeColor
  109.   if myLine = -1 then
  110.     set the foreColor of field "asset list" to gForeColor
  111.     exit
  112.   end if
  113.   set the foreColor of line myLine of field "asset list" to gBackColor
  114. end
  115.  
  116. on check
  117.   global myLine, auto, csn, gExtraVid, fullMoov
  118.   if myLine > (csn + gExtraVid) then
  119.     exit
  120.   end if
  121.   if (the movieTime of sprite 24 > 0) and (the movieTime of sprite 24 <> fullMoov) then
  122.     exit
  123.   end if
  124.   if (auto = 0) and (the movieTime of sprite 24 = fullMoov) then
  125.     if myLine = (csn + gExtraVid) then
  126.       set the movieTime of sprite 24 to 0
  127.       exit
  128.     end if
  129.   end if
  130.   if (auto = 1) and (the movieRate of sprite 24 = 0) then
  131.     if the movieTime of sprite 24 = fullMoov then
  132.       if myLine = csn then
  133.         set auto to 0
  134.         set myLine to 1
  135.         set the castNum of sprite 7 to 25
  136.         exit
  137.       else
  138.         set myLine to myLine + 1
  139.         moovUpDown()
  140.       end if
  141.     else
  142.       if (the movieTime of sprite 24 = 0) and (auto = 1) then
  143.         set the movieRate of sprite 24 to 1
  144.       else
  145.         set the movieRate of sprite 24 to 0
  146.       end if
  147.     end if
  148.   end if
  149. end
  150.  
  151. on moovUpDown
  152.   global myLine, vid
  153.   if vid = 0 then
  154.     set the video of cast (myLine + 100) to 0
  155.     set the controller of cast (myLine + 100) to 0
  156.     updateStage()
  157.     set vid to 1
  158.     exit
  159.   end if
  160.   if vid = 1 then
  161.     set the video of cast (myLine + 100) to 1
  162.     set the controller of cast (myLine + 100) to 1
  163.     updateStage()
  164.     set vid to 0
  165.     exit
  166.   end if
  167. end
  168.  
  169. on blankBut
  170.   global gAudBlrb, auto
  171.   if myLine = 1 then
  172.     set the castNum of sprite 4 to 30
  173.     set the castNum of sprite 6 to 24
  174.     if auto = 0 then
  175.       set the castNum of sprite 7 to 25
  176.     else
  177.       set the castNum of sprite 7 to 35
  178.     end if
  179.   else
  180.     if (myLine > 1) and (myLine < csn) then
  181.       set the castNum of sprite 4 to 22
  182.       set the castNum of sprite 6 to 24
  183.       if auto = 0 then
  184.         set the castNum of sprite 7 to 25
  185.       else
  186.         set the castNum of sprite 7 to 35
  187.       end if
  188.     else
  189.       if myLine = csn then
  190.         set the castNum of sprite 4 to 22
  191.         set the castNum of sprite 6 to 40
  192.         if auto = 0 then
  193.           set the castNum of sprite 7 to 25
  194.         else
  195.           set the castNum of sprite 7 to 35
  196.         end if
  197.       else
  198.         if myLine = (csn + gExtraVid) then
  199.           set the castNum of sprite 4 to 30
  200.           set the castNum of sprite 6 to 40
  201.           set the castNum of sprite 7 to 50
  202.         else
  203.           if gAudBlrb = 1 then
  204.             set the castNum of sprite 4 to 30
  205.             set the castNum of sprite 6 to 40
  206.             set the castNum of sprite 7 to 50
  207.           end if
  208.         end if
  209.       end if
  210.     end if
  211.   end if
  212. end
  213.  
  214. on patchPal
  215.   fixPal(mPatchIt)
  216. end
  217.  
  218. on stopMovie
  219.   if the machineType = 256 then
  220.     fixPal(mdispose)
  221.     closeXLib("xpalette.dll")
  222.   else
  223.     fixPal(mdispose)
  224.     closeXLib("XPALETTE")
  225.   end if
  226. end
  227.  
  228. on flushMe
  229.   if the machineType = 256 then
  230.     openXLib("GLOBMEM")
  231.     set OBJ to GLOBMEM(mnew)
  232.     OBJ(mFreeHandles, 8192)
  233.     OBJ(mFreeHandles, 8192)
  234.     OBJ(mFreeHandles, 8192)
  235.     OBJ(mdispose)
  236.   end if
  237. end
  238.